@extends('member.member')

@section('title', '我的评论')

@section('rightcontainer')
<script src="{{ asset('/js/admin.js') }}"></script>
<div id="wendang" style="background: white;width: 993px; margin-top: 20px;">
    <div class="table-responsive panel-body">
        <table class="table table-hover">
            <thead>
            <tr>
                <th>编号</th>
                <th>课程</th>
                <th>费用</th>
                <th>总体评分</th>
                <th>评论内容</th>
                <th>发布时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            @foreach($comments as $res)
            <tr id="news_{{ $res->id }}">
                <td>{{ $res->id }}</td>
                <td>
                   @if(!empty($res->cname))
                    <a href="{{ url('/teaches/orgcourse/'.$res->c_id)}} " title="{{$res->cname}}">
                        {{ str_limit($res->cname,16)}}
                    </a>
                   @else 课程已删除 @endif
                </td>
                <td>{{ ($res->cost>0)?$res->cost:'无'}}</td>
                <td>{{ $res->score}}星</td>
                <td><a href="javascript:void(0)"  onclick="showComment('{{$res->content}}')">{{ str_limit($res->content,20)}}</a></td>
                <td>{{ $res->updated_at}}</td>
                <td>
                    <a href="javascript:void(0);" onclick="del_one('/admin/teaches/class/comment/delete','{{$res->id}}','{{csrf_token()}}','id')">
                        <i class="glyphicon glyphicon-remove-sign"></i>
                    </a>
                </td>
            </tr>
            @endforeach
            </tbody>
        </table>
    </div>
    <div class="paginate">{!! $comments->render() !!} </div>
</div>

@stop

@section('footer')
@parent
@stop

